Computing devices may connect with peripheral devices such as mice, keyboards, printers, speakers, scanners, microphones, and web cameras via the Universal Serial Bus (USB), which is an industry standard that defines communication protocols between computing devices and peripheral devices. With USB, a host computing device (105) uses a bus enumeration process to identify and manage the state of USB devices (107) when the USB devices (107) are attached or removed from a USB port connected to (or on) the host computing device (105). The host/device relationship is illustrated in FIG. 1a. Each device (107) identifies itself using a series of descriptor messages in the enumeration process. The descriptor messages use a well-defined protocol and can be recorded using a USB analyzer, as illustrated in FIG. 1b (101). FIG. 1b shows various commands sent between a USB device and a host computing device in order to communicate. Typically, a device descriptor includes a device ID, strings, and report descriptors. An example device descriptor is shown in FIG. 4a (401). Additional messages may define the input, outputs, and statuses of the devices.
Many conventional computing systems, such as point of sale (POS) systems, require multiple USB peripheral devices in order to properly function. For example, computing systems may include a USB keyboard, a USB mouse, and a USB scanner/printer. It is critical to test the computing system and the interactions with all peripheral devices to determine whether the computing system is working correctly. These systems may require a physical connection between a USB device and a computing device to test USB device/host interaction.
Tests should verify how a computing device or system under test responds to peripherals and also verify that applications and/or systems, which require specific peripherals, function properly. To test and verify a system's interaction with peripherals, it is customary to perform manual data entry and verification procedures for each peripheral device that can be connected to the system. Manual entry is required for each device because each device presents itself with unique USB identifications and simple generic interface testing does not verify the specific features of each device. Furthermore, when testing a system or application that requires specific USB peripherals, such as special keyboards, it is customary to perform manual testing and validation using the full system. These testing methods are prone to errors and may need to be repeated to guarantee accuracy.
As recognized by the inventors, there should be a way to automatically emulate peripheral devices in systems to be tested, while minimizing errors and ensuring accuracy.